
const state = {
  type: '', // 分为order订单 或者 bill账单
  serviceId: '',
  unionPay: false,
  wechatPay: true,
  step: 1,
  isCreditMY: 0,
  openId: window.localStorage.getItem('openId')
}

const mutations = {
  // 支付信息
  setPayInfo (state, payInfo) {
    state.type = payInfo.type
    state.serviceId = payInfo.serviceId
    state.unionPay = payInfo.unionPay
    state.wechatPay = payInfo.wechatPay
    state.step = payInfo.step
    state.creditMY = payInfo.CreditMY
  },
  setCreditMYJ (state, isCreditMY) {
    console.log(isCreditMY)
    state.creditMY = isCreditMY
  }
}

export default {
  namespaced: true,
  state,
  mutations
}
